<?php

namespace app\api\controller;

use app\ApiController;
use support\utils\SparkTools;
class CommonController extends ApiController
{
    /**
     * 发送登录短信
     */
    public function sendMsg()
    {
        $phone = request()->post('phone');
        $type =  request()->post('type', 'login_sms_code');

        $res = SparkTools::sendSms(['phone' => $phone, 'type' => $type]);
        return sparkSuccess($res);
    }

}
